/*
* Copyright (c) 2011 Nokia Corporation and/or its subsidiary(-ies).
* All rights reserved.
* This component and the accompanying materials are made available
* under the terms of "Eclipse Public License v1.0"
* which accompanies this distribution, and is available
* at the URL "http://www.eclipse.org/legal/epl-v10.html".
*
* Initial Contributors:
* Nokia Corporation - initial contribution.
*
* Contributors:
*
* Description: main.qml.
*/

import QtQuick 1.0
import QtMobility.feedback 1.1

/*!
 *  \file
 *  \brief Main qml file fo the application.
 *
 *  Uses view manager to handle the application views.
 */

Rectangle {
    id: topMostView
    width: 360
    height: 640

    // Publish map center point to views.
    property alias posChange: myLocationMapView.mapCenter
    property alias showDialog: myStoreDialog.visible
    property alias showLocations: myBookmarks.visible
    property bool sharing: false

    ViewManager {
        id: locationViewManager
        anchors.fill: parent

        Mapview {
            id: myLocationMapView
        }

        Storedialog {
            id: myStoreDialog
        }

        Bookmarkview {
            id: myBookmarks
        }

        Commondialog {
            id: myInfoDialog
        }
    }

    Image {
        source : "close.png"
        x: topMostView.width - width
        y: 10
        width: 60;
        height: 60;
        MouseArea {
            anchors.fill: parent;
            onClicked: { Qt.quit(); }
        }
    }

    ThemeEffect {
         id: clickEffect
         effect: ThemeEffect.Basic
     }
}
